<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .active {
            background-color: aqua;
        }
    </style>
</head>

<body>
    <div class="box">box1</div>
    <div class="box " hello="">box2</div>
    <div class="box active">box3</div>
    <div class="box">box4</div>

    <input type="checkbox" name="" id="">

    <img src="" alt="">

    <button class="btn">change</button>
    <script src="../js/jquery.js"></script>

    <script>
        $(".box").attr({
            "idx": (index) => {
                return index
            }
        })
        let idx = $(".box").attr("idx");
        console.log(idx)

        $(".box").removeAttr("hello");


        let a = $("input[type=checkbox]").prop("checked")
        console.log(a)
        // $("img").prop("src='../images/1.png'     ")

        $(".btn").click(() => {
            $(".box").toggleClass("active");
        })

    </script>

</body>

</html>